﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TicketsForm.aspx.cs"
Inherits="schedulelist.TicketsForm" MasterPageFile="~/Site.Master"%>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table align="center">
    <tr align="center">
    <td>
        <table>
            <tr align="center">
                <td valign="top">
                <table id="t1" >
                <tr>
                        <td  >
            
                            <asp:Button ID="Button1" runat="server"  OnClick="ibInsert_Click"  
                            Text="Add ticket"  Height="20" Width="110"/>
                        </td></tr><tr>
                        <td>
                                <asp:Button ID="Button3" runat="server"  OnClick="ShowAll"  
                                Text="Show all tickets"  Height="20" Width="110"/>
                        </td></tr><tr>
                        <td>
                                <asp:Button ID="Button9" runat="server"  Visible = "true" OnClick="QAD"
                                Text="Quick adding"  Height="20" Width="110"/>
                        </td>                  
                </tr>
                </table>
        </td>
                <td>
                        <table id="t2" align="center">
                                        <tr>
                                        <td style="width: 370px">
                                            <asp:DropDownList ID="DropDownList1" runat="server" Visible="true" Width="130">
                                            </asp:DropDownList>
                                            <asp:DropDownList ID="DropDownList2" runat="server" Visible="true" Width="130">
                                            </asp:DropDownList>                 
                                        </td>
                                        </tr>                        
                                        <tr>
                                        <td style="width: 370px">
                                            <asp:Button ID="Button4" runat="server"  OnClick="SelectByCat"  
                                            Text="Select By Category"  Height="20" Width="132"/>
                                            <asp:Button ID="Button2" runat="server"  OnClick="SelectByCust"  
                                            Text="Select By Customer"  Height="20" Width="132"/>
                                        </td>
                                        </tr>
                            </table>
                </td>
                <td style="width: 160px">
                        <asp:Label ID="Label4" runat="server" Text="Tickets"
                        Font-Size="20pt" ForeColor="#000000" Font-Bold="True"/>
                </td>
                        
                <td>
                            <table align="center">
                                    <tr>
                                        <td style="width: 370px">
                                        
                                            <asp:DropDownList ID="DropDownList3" runat="server" Visible="true" Width="130">
                                            </asp:DropDownList>
                                            <asp:DropDownList ID="DropDownList4" runat="server" Visible="true" Width="130">
                                            </asp:DropDownList>
                                        </td>
                                            </tr>
                                     
                                            <tr>
                                            <td style="width: 370px">
                                            <asp:Button ID="Button5" runat="server"  OnClick="SelectByOwner"  
                                            Text="Select By Owner"  Height="20" Width="132"/>
                                            <asp:Button ID="Button6" runat="server"  OnClick="SelectByExecutor"  
                                            Text="Select By Executor"  Height="20" Width="132"/>
                                        
                                            </td>
                                            </tr>
                                     
                                    </table>
                </td>
            </tr>
        </table>
    
    </td>
    </tr>
    <tr>
    <td>
    <asp:GridView ID="GridView1" runat="server" ForeColor="#000000" BorderWidth="2px" 
    AutoGenerateColumns="false" Visible="true" BorderColor="Silver"
    ShowFooter="false" ShowHeader="true"
    AllowPaging="true" PageSize="20"
    onpageindexchanging="GridView1_PageIndexChanging"
    onrowdeleting="GridView1_RowDeleting" Font-Size="9pt"
    onrowediting="GridView1_RowEditing" RowStyle-HorizontalAlign="Center">
    <Columns>
    <asp:TemplateField HeaderText="Id" Visible="false"
    ItemStyle-Width="1" >
    <ItemTemplate>
    <asp:Label id="myLabel1" runat="server" 
    Text='<%# Bind("Id")%>' />
    </ItemTemplate>

    <ItemStyle Width="100px"></ItemStyle>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Owner" ControlStyle-Width="60" HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-Width="100" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0">
    <ItemTemplate>
    <asp:Label id="myLabel2" runat="server" Font-Names="Segoe Print" 
    Text='<%# Bind("owner")%>' />
    <asp:DropDownList ID="DropDownList5" Visible="false" runat="server"  Width="60">
                                </asp:DropDownList>
    </ItemTemplate>
    <FooterTemplate>
    <asp:DropDownList ID="DropDownList6" runat="server"  Width="60">
                                </asp:DropDownList>
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Date_must" ControlStyle-Width="155" HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-Width="100" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0">
    <ItemTemplate>
    <asp:Label id="myLabel3" runat="server" Font-Names="Segoe Print" 
    Text='<%# Bind("dm")%>' />
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="myTextBox3" runat="server" Width="155"
    Text='<%# Bind("dm") %>'/>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="myFooterTextBox3" runat="server"
    Width="155" Text='<%# Bind("dm") %>' />
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Date_done" ControlStyle-Width="155" HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-Width="100" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0">
    <ItemTemplate>
    <asp:Label id="myLabel4" runat="server" Font-Names="Segoe Print" 
    Text='<%# Bind("dd")%>' />
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="myTextBox4" runat="server" Width="155"
    Text='<%# Bind("dd") %>'/>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="myFooterTextBox4" runat="server"
    Width="155" Text='<%# Bind("dd") %>' />
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Task" HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ControlStyle-Width="300px" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0">
    <ItemTemplate>
    <asp:Label id="myLabel5" runat="server" Font-Names="Segoe Print" 
    Text='<%# Bind("task")%>' />
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="myTextBox5" runat="server" Width="300"  
    Text='<%# Bind("task") %>'/>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="myFooterTextBox5" runat="server"  
    Width="300" Text='<%# Bind("task") %>' />
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Status" ControlStyle-Width="85" HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-Width="100" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0">
    <ItemTemplate>
    <asp:Label id="myLabel6" runat="server" Font-Names="Segoe Print" 
    Text='<%# Bind("status")%>' />
    </ItemTemplate>
    <EditItemTemplate>
    <asp:DropDownList ID="DropDownList7" runat="server" Width="85">
                                    <asp:ListItem Selected="Booked" Value="Booked"> Booked </asp:ListItem>
                                    <asp:ListItem Value="Active"> Active </asp:ListItem>
                                    <asp:ListItem Value="In progress"> In progress </asp:ListItem>
                                    <asp:ListItem Value="Completed"> Completed </asp:ListItem>
                                </asp:DropDownList>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:DropDownList ID="DropDownList8" runat="server" Width="85">
                                    <asp:ListItem Selected="Active" Value="Active"> Active </asp:ListItem>
                                    <asp:ListItem Value="Booked"> Booked </asp:ListItem>
                                    <asp:ListItem Value="In progress"> In progress </asp:ListItem>
                                    <asp:ListItem Value="Completed"> Completed </asp:ListItem>
                                </asp:DropDownList>
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Executor" ControlStyle-Width="80" HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-Width="100" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0">
    <ItemTemplate>
    <asp:Label id="myLabel7" runat="server" Font-Names="Segoe Print" 
    Text='<%# Bind("ex")%>' />
    <asp:DropDownList ID="DropDownList9" Visible="false" runat="server"  Width="60">
                                </asp:DropDownList>
    </ItemTemplate>
    <FooterTemplate>
    <asp:DropDownList ID="DropDownList10" runat="server"  Width="60">
                                </asp:DropDownList>
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Customer" ControlStyle-Width="60" HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-Width="100" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0">
    <ItemTemplate>
    <asp:Label id="myLabel8" runat="server" Font-Names="Segoe Print" 
    Text='<%# Bind("cust")%>' />
    <asp:DropDownList ID="DropDownList11" Visible="false" runat="server"  Width="60">
                                </asp:DropDownList>
    </ItemTemplate>
    <FooterTemplate>
    <asp:DropDownList ID="DropDownList12" runat="server"  Width="60">
                                </asp:DropDownList>
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Category" Visible="false"  ControlStyle-Width="60" HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-Width="100" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0" >
    <ItemTemplate>
    <asp:Label id="myLabel9" runat="server" Font-Names="Segoe Print" 
    Text='<%# Bind("cat")%>' />
    <asp:DropDownList ID="DropDownList13" Visible="false" runat="server"  Width="60">
                                </asp:DropDownList>
    </ItemTemplate>
    <FooterTemplate>
    <asp:DropDownList ID="DropDownList14" runat="server"  Width="60">
                                </asp:DropDownList>
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="AddInf" Visible="false"   HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-Width="100" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0"
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0" ControlStyle-Width="100">
    <ItemTemplate>
    <asp:Label id="myLabel10" runat="server" ControlStyle-Width="100" Font-Names="Segoe Print"
    Text='<%# Bind("addinf")%>' />
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="myTextBox10" runat="server" Width="100"
    Text='<%# Bind("addinf") %>'/>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="myFooterTextBox10" runat="server"
    Width="100" Text='<%# Bind("addinf") %>' />
    </FooterTemplate>
    </asp:TemplateField>
    <asp:TemplateField HeaderText="Actions"  HeaderStyle-Font-Italic="true" HeaderStyle-Font-Underline="true"  HeaderStyle-Font-Bold="false" ItemStyle-BackColor="#CCCCCC" ItemStyle-BorderColor="#C0C0C0" 
    HeaderStyle-BackColor="#CCCCCC" HeaderStyle-BorderColor="#C0C0C0"  >
    <ItemTemplate>
    <table><tr><td>
    <asp:Button ID="ibDelete" runat="server" CommandName="Delete" 
        Text="Del"  Height="20" Width="30"  /></td>
        <td><asp:Button ID="Button7" runat="server"   CommandName="Edit" Visible="true" 
        Text="Edit"  Height="20" Width="40"/></td>
        <td> <asp:Button ID="Button2" runat="server" OnClick="Updating" Visible="false" 
        Text="Edit now"  Height="20" Width="55"/></td>
        <td> <asp:Button ID="Button3" runat="server"  Visible = "false" OnClick="Undo"
        Text="Cancel"  Height="20" Width="45"/></td>
        <td> <asp:Button ID="Button6" runat="server" OnClick="AED" Visible="false" 
        Text="Advanced edit"  Height="20" Width="100"/></td>
        </tr>
        </table>
    </ItemTemplate>
    <FooterTemplate>
    <table><tr><td>
    <asp:Button ID="Button5" runat="server"  OnClick="QuickAd"  
        Text="Add"  Height="20" Width="50"/></td>
        <td><asp:Button ID="Button8" runat="server"  OnClick="Undo"
        Text="Cancel"  Height="20" Width="65"/></td>
        </tr>
        </table>
    </FooterTemplate>
    </asp:TemplateField>
    </Columns>
    <PagerStyle HorizontalAlign ="Center" />

    <RowStyle HorizontalAlign="Center" BorderColor="Silver"></RowStyle>
    </asp:GridView>
    </td>
    </tr>
    <tr>
    <td>
                
    </td>
    </tr>
    </table>
</asp:Content>

